package com.zcsy.manage.model.mall;

import java.math.BigDecimal;

/**  
 * @Project: model
 * @Title: OrderMoney.java
 * @Package com.zcsy.shop.model.orders
 * @Description: 订单金额对象
 *
 * @author xiangjw 303310059@qq.com
 * @date 2015年12月23日 下午12:56:31
 * @Copyright: 2015 武汉中财数元信息技术有限公司 All rights reserved.
 * @version V1.0  
 */
public class OrderMoney {
	
	public static final int DISC_TYPE_MEMBER = 1;		//会员折扣
	public static final int DISC_TYPE_MEMBER_DAY = 2;	//会员日折扣
	public static final int DISC_TYPE_CODE = 3;			//会员优惠码
	public static final int DISC_TYPE_ACTIVITY = 4;		//商品促销活动
	
	
	public static final int DISC_WAY_DIS = 0;			//折扣
	public static final int DISC_WAY_DERATE = 1;		//减免
	public static final int DISC_TYPE_DEDUCTION = 2;	//抵扣

	/**
	 * 订单实付金额
	 */
	private BigDecimal money;
	
	/**
	 * 主要折扣类型
	 * 如有成功使用优惠码，则返回DISC_TYPE_CODE
	 * 如有成功使用会员日折扣，则返回DISC_TYPE_MEMBER_DAY
	 * 如有成功使用会员折扣，则返回DISC_TYPE_MEMBER
	 * 如有成功使用促销活动价，则返回DISC_TYPE_ACTIVITY
	 * 优先级：优惠码>会员日折扣>会员折扣>促销活动价
	 * 默认：0
	 */
	private int mainDiscountType;
	
	/**
	 * 主要折扣方式
	 * 折扣：DISC_WAY_DIS
	 * 减免：DISC_WAY_DERATE
	 * 抵扣：DISC_TYPE_DEDUCTION
	 * 默认：-1
	 */
	private int mainDiscountWay;
	
	/**
	 * 主要折扣
	 * 如果是折扣，则返回数字，如9，表示打9折
	 * 如果是减免或抵扣，则返回金额，如50，表示抵扣50元
	 * 默认：null
	 */
	private String mainDiscount;
	
	/**
	 * 购买商品是否符合条件
	 */
	private boolean success;
	
	/**
	 * 提示信息
	 */
	private String msg;
	
	/**
	 * 购买数量
	 */
	private int amount;

	public int getAmount() {
        return amount;
    }

    public void setAmount(int amount) {
        this.amount = amount;
    }

    public BigDecimal getMoney() {
		return money;
	}

	public void setMoney(BigDecimal money) {
		this.money = money;
	}

	public int getMainDiscountType() {
		return mainDiscountType;
	}

	public void setMainDiscountType(int mainDiscountType) {
		this.mainDiscountType = mainDiscountType;
	}

	public int getMainDiscountWay() {
		return mainDiscountWay;
	}

	public void setMainDiscountWay(int mainDiscountWay) {
		this.mainDiscountWay = mainDiscountWay;
	}

	public String getMainDiscount() {
		return mainDiscount;
	}

	public void setMainDiscount(String mainDiscount) {
		this.mainDiscount = mainDiscount;
	}

    public boolean isSuccess() {
        return success;
    }

    public void setSuccess(boolean success) {
        this.success = success;
    }

    public String getMsg() {
        return msg;
    }

    public void setMsg(String msg) {
        this.msg = msg;
    }
	
	
}
